<form action="index.jsp" method="post" onsubmit="return submitTest();">
    <INPUT value="www">
    <input type="submit" value="submit">
</form>

<script>
    function submitTest() {
        return false;
    }    
</script>